<?php
include 'config.php';
if(!isset($_COOKIE['gid'])){
    header('Location:http://'.$_SERVER['HTTP_HOST'].'/salusme/');
}
/*
 * This is header image and images of all pages.
 */
/*
 * buyer image
 */
$buyer = mysql_query("select * from salus_user_profile_detail where FK_fa_user_id='" . $_COOKIE['gid'] . "' ") or die(mysql_error());
while ($row000 = mysql_fetch_array($buyer)) {
    $photo_path = 'http://'.$_SERVER['HTTP_HOST'].'/salusme/storage/profile_photo/';
    $buyer_photo = $row000['photo'];
    $buyer_name = $row000['name'] . '&nbsp;' . $row000['sur_name'];    
}

?>

<div id="header_small">
    <div class="color_white padding_20 float_right" id="user_detail">
        <div>            

            <img alt="<?= $buyer_email ?>" title="<?= $buyer_email ?>" width="80px" height="80px" src="<?= $photo_path.$buyer_photo  ?>" style="margin-left: 880px;"  />                 
        </div>
        <div style="font-size: 18px;font-weight: bold; text-align: right; margin-top: -40px; margin-right: 100px; ">
            <div><?= $buyer_name ?></div>
            <div><a href="http://<?php echo $_SERVER['HTTP_HOST'].'/salusme/user/view/'; ?>myaccount.php" style="color: #FFF">My account</a></div>
        </div>

<!--        <div class="float_right header_name">
            <div style="font-size: 15px;font-weight: bold"><?= $buyer_name ?></div>            
            <div style="font-size: 15px;font-weight: bold;"><a href="myaccount.php" style="color: #FFF">My account</a></div>
                                <div>
                                    <select>
                                        <option>Select</option>
                                    </select>
                                </div>
        </div>-->
        <div class="clear"></div>
    </div>
</div>